//
//  AOJIBottomToolBar.m
//  Aoji
//
//  Created by beyondsoft on 14/12/6.
//  Copyright (c) 2014年 chengli. All rights reserved.
//

#import "AOJIBottomToolBar.h"

@implementation AOJIBottomToolBar
{
    UIImageView     *bgImgView;
}

@synthesize titleLabel = _titleLabel;

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc ]init];
        _titleLabel.frame = CGRectMake(0, 0, 320, 80);
        _titleLabel.font = [UIFont boldSystemFontOfSize:25];
        _titleLabel.textColor = [UIColor whiteColor];
        _titleLabel.shadowColor = [UIColor blackColor];
        _titleLabel.shadowOffset = CGSizeMake(0, 1);
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        [bgImgView addSubview:_titleLabel];
    }
    return _titleLabel;
}

#pragma mark - Life Cycle

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        bgImgView = [[UIImageView alloc] initWithFrame:CGRectMake(frame.origin.x - 4, frame.origin.y - 4, frame.size.width + 8, frame.size.height + 8)];
        UIImage *bgImg = [UIImage imageNamed:@"toumingdu.png"];
        bgImg = [bgImg stretchableImageWithLeftCapWidth:20 topCapHeight:20];

        bgImgView.image = bgImg;
        [self addSubview:bgImgView];
        
    }
    return self;
}

@end
